<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 计算属性初体验 -->
</head>
<body>
    <div id="app">
        <div>count is:{{count}}</div>
        <div>count2 is:{{doubleCount}}</div>
    </div>
</body>
<script src="./lib//vue.global.js"></script>
<script>
    const {createApp} = Vue
    createApp({
       data() {
        return {
            count:10
        }
       }, 
       computed:{
        doubleCount(){
            return this.count*2
        }
       }
    }).mount('#app')
</script>
</html>